package com.zcxx.cotton.sale.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
 * 交售信息对象 buy_subsidy_records
 * 
 * @author ruoyi
 * @date 2025-09-19
 */
public class BuySubsidyRecords implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键ID，对应JSON中的_id */
    private String id;

    /** 补贴编号 */
    @Excel(name = "补贴编号")
    private String subsidyNum;

    /** 清单编号 */
    @Excel(name = "清单编号")
    private String slistNum;

    /** 当事人姓名 */
    @Excel(name = "当事人姓名")
    private String partyname;

    /** 身份证号/统一社会信用代码，对应speasant.certnumber */
    @Excel(name = "身份证号/统一社会信用代码，对应speasant.certnumber")
    private String certnumber;

    /** 地址，对应speasant.address */
    @Excel(name = "地址，对应speasant.address")
    private String address;

    /** 种植者类型(企业/个人)，对应speasant.planter_flag */
    @Excel(name = "种植者类型(企业/个人)，对应speasant.planter_flag")
    private String planterFlag;

    /** 专项农户姓名，对应speasant.speasant_name */
    @Excel(name = "专项农户姓名，对应speasant.speasant_name")
    private String speasantName;

    /** 农户电话，对应speasant.speasant_phone */
    @Excel(name = "农户电话，对应speasant.speasant_phone")
    private String speasantPhone;

    /** 种植信息(地区-乡镇-村,面积,追溯号)，对应speasant.speasant_plant */
    @Excel(name = "种植信息(地区-乡镇-村,面积,追溯号)，对应speasant.speasant_plant")
    private String speasantPlant;

    /** 种植地址(村)，对应speasant.region.farmerPlantAddress */
    @Excel(name = "种植地址(村)，对应speasant.region.farmerPlantAddress")
    private String farmerPlantAddress;

    /** 完整区域名称，对应speasant.region.regionName */
    @Excel(name = "完整区域名称，对应speasant.region.regionName")
    private String regionName;

    /** 种植面积(亩)，对应speasant.region.cropArea */
    @Excel(name = "种植面积(亩)，对应speasant.region.cropArea")
    private String cropArea;

    /** 棉花品种，对应speasant.region.cottonVariety */
    @Excel(name = "棉花品种，对应speasant.region.cottonVariety")
    private String buyVariety;

    /** 追溯编号，对应speasant.region.traceNo */
    @Excel(name = "追溯编号，对应speasant.region.traceNo")
    private String traceNo;

    /** 批准土地类型，对应speasant.region.ratifyLandType */
    @Excel(name = "批准土地类型，对应speasant.region.ratifyLandType")
    private String ratifyLandType;

    /** 预测产量，对应speasant.region.forecastYield */
    @Excel(name = "预测产量，对应speasant.region.forecastYield")
    private String forecastYield;

    /** 公司名称，对应speasant.region.companyName */
    @Excel(name = "公司名称，对应speasant.region.companyName")
    private String companyName;

    /** 统一社会信用代码，对应speasant.region.usci */
    @Excel(name = "统一社会信用代码，对应speasant.region.usci")
    private String usci;

    /** 种子销售标志，对应speasant.region.seedSale */
    @Excel(name = "种子销售标志，对应speasant.region.seedSale")
    private String seedSale;

    /** 净重量，对应scale.nqy_weight */
    @Excel(name = "净重量，对应scale.nqy_weight")
    private String nqyWeight;

    /** 毛重，对应scale.gross_weight */
    @Excel(name = "毛重，对应scale.gross_weight")
    private String grossWeight;

    /** 皮重，对应scale.tare_weight */
    @Excel(name = "皮重，对应scale.tare_weight")
    private String tareWeight;

    /** 毛重称重方式，对应scale.gross_way */
    @Excel(name = "毛重称重方式，对应scale.gross_way")
    private Long grossWay;

    /** 皮重称重方式，对应scale.tare_way */
    @Excel(name = "皮重称重方式，对应scale.tare_way")
    private Long tareWay;

    /** 毛重称重时间，对应scale.gross_date */
    @Excel(name = "毛重称重时间，对应scale.gross_date")
    private String grossDate;

    /** 皮重称重时间，对应scale.tare_date */
    @Excel(name = "皮重称重时间，对应scale.tare_date")
    private String tareDate;

    /** 支撑重量，对应scale.buttress_weight */
    @Excel(name = "支撑重量，对应scale.buttress_weight")
    private String buttressWeight;

    /** 膜皮重量，对应scale.nmembrane_skin */
    @Excel(name = "膜皮重量，对应scale.nmembrane_skin")
    private String nmembraneSkin;

    /** 农业公司ID，对应agr.agr_company_id */
    @Excel(name = "农业公司ID，对应agr.agr_company_id")
    private String agrCompanyId;

    /** 农业公司名称，对应agr.agr_company_name */
    @Excel(name = "农业公司名称，对应agr.agr_company_name")
    private String agrCompanyName;

    /** 农业区域ID，对应agr.agr_section_id */
    @Excel(name = "农业区域ID，对应agr.agr_section_id")
    private String agrSectionId;

    /** 农业区域名称，对应agr.agr_section_name */
    @Excel(name = "农业区域名称，对应agr.agr_section_name")
    private String agrSectionName;

    /** 含水率(%)，对应agr.agr_nwet */
    @Excel(name = "含水率(%)，对应agr.agr_nwet")
    private String agrNwet;

    /** 含杂率(%)，对应agr.agr_nimpurity */
    @Excel(name = "含杂率(%)，对应agr.agr_nimpurity")
    private String agrNimpurity;

    /** 工厂名称，对应factory_name */
    @Excel(name = "工厂名称，对应factory_name")
    private String factoryName;

    /** 农户相关图片路径数组，对应speasant.speasant_pic */
    @Excel(name = "农户相关图片路径数组，对应speasant.speasant_pic")
    private String speasantPic;

    /** 毛重后图片，对应scale_pic.sgross_after_name */
    @Excel(name = "毛重后图片，对应scale_pic.sgross_after_name")
    private String grossAfterPic;

    /** 毛重后额外图片，对应scale_pic.sgross_later_name */
    @Excel(name = "毛重后额外图片，对应scale_pic.sgross_later_name")
    private String grossLaterPic;

    /** 皮重后图片，对应scale_pic.stare_after_name */
    @Excel(name = "皮重后图片，对应scale_pic.stare_after_name")
    private String tareAfterPic;

    /** 皮重后额外图片，对应scale_pic.stare_later_name */
    @Excel(name = "皮重后额外图片，对应scale_pic.stare_later_name")
    private String tareLaterPic;

    /** 删除标识：0 存在 1 删除 */
    private String delFlag;

    /** 部门主键 */
    @Excel(name = "部门主键")
    private Long deptId;

    /** 状态（0正常 1暂停） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=暂停")
    private String status;

    /** 创建者 */
    private String createBy;

    /** 创建时间 */
    @Excel(name = "创建时间")
    private String createTime;

    /** 更新者 */
    private String updateBy;

    /** 更新时间 */
    private String updateTime;

    /** 备注信息 */
    @Excel(name = "备注信息")
    private String remark;

    /** 年度 */
    @Excel(name = "年度")
    private String year;

    /** 棉包追溯码列表 */
    @Excel(name = "棉包追溯码列表")
    private String sampleNumberList;

    /** 追溯码数量 */
    @Excel(name = "追溯码数量")
    private Long sampleNumberCount;

    /** 龙门架数据ID */
    private Long saleInfosId;
    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params;
    /** 搜索值 */
    @JsonIgnore
    @TableField(exist = false)
    private String searchValue;

    public String getSearchValue()
    {
        return searchValue;
    }

    public void setSearchValue(String searchValue)
    {
        this.searchValue = searchValue;
    }

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }


    // 内部类用于处理嵌套的region对象
    @Data
    public static class RegionInfo {
        @JsonProperty("farmerName")
        private String farmerName;

        @JsonProperty("farmerPhone")
        private String farmerPhone;

        @JsonProperty("farmerPlantAddress")
        private String farmerPlantAddress;

        @JsonProperty("regionName")
        private String regionName;

        @JsonProperty("cropArea")
        private String cropArea;

        @JsonProperty("cottonVariety")
        private String cottonVariety;

        @JsonProperty("traceNo")
        private String traceNo;

        @JsonProperty("ratifyLandType")
        private String ratifyLandType;

        @JsonProperty("seedWeight")
        private BigDecimal seedWeight;

        @JsonProperty("forecastYield")
        private String forecastYield;

        @JsonProperty("companyName")
        private String companyName;

        @JsonProperty("seedSale")
        private String seedSale;

        @JsonProperty("usci")
        private String usci;
    }

    // 内部类用于处理嵌套的scale_pic对象
    @Data
    public static class ScalePictures {
        @JsonProperty("sgross_after_name")
        private String grossAfterName;

        @JsonProperty("sgross_later_name")
        private String grossLaterName;

        @JsonProperty("stare_after_name")
        private String tareAfterName;

        @JsonProperty("stare_later_name")
        private String tareLaterName;
    }
    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setSubsidyNum(String subsidyNum) 
    {
        this.subsidyNum = subsidyNum;
    }

    public String getSubsidyNum() 
    {
        return subsidyNum;
    }

    public void setSlistNum(String slistNum) 
    {
        this.slistNum = slistNum;
    }

    public String getSlistNum() 
    {
        return slistNum;
    }

    public void setPartyname(String partyname) 
    {
        this.partyname = partyname;
    }

    public String getPartyname() 
    {
        return partyname;
    }

    public void setCertnumber(String certnumber) 
    {
        this.certnumber = certnumber;
    }

    public String getCertnumber() 
    {
        return certnumber;
    }

    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }

    public void setPlanterFlag(String planterFlag) 
    {
        this.planterFlag = planterFlag;
    }

    public String getPlanterFlag() 
    {
        return planterFlag;
    }

    public void setSpeasantName(String speasantName) 
    {
        this.speasantName = speasantName;
    }

    public String getSpeasantName() 
    {
        return speasantName;
    }

    public void setSpeasantPhone(String speasantPhone) 
    {
        this.speasantPhone = speasantPhone;
    }

    public String getSpeasantPhone() 
    {
        return speasantPhone;
    }

    public void setSpeasantPlant(String speasantPlant) 
    {
        this.speasantPlant = speasantPlant;
    }

    public String getSpeasantPlant() 
    {
        return speasantPlant;
    }

    public void setFarmerPlantAddress(String farmerPlantAddress) 
    {
        this.farmerPlantAddress = farmerPlantAddress;
    }

    public String getFarmerPlantAddress() 
    {
        return farmerPlantAddress;
    }

    public void setRegionName(String regionName) 
    {
        this.regionName = regionName;
    }

    public String getRegionName() 
    {
        return regionName;
    }

    public void setCropArea(String cropArea) 
    {
        this.cropArea = cropArea;
    }

    public String getCropArea() 
    {
        return cropArea;
    }

    public void setBuyVariety(String buyVariety) 
    {
        this.buyVariety = buyVariety;
    }

    public String getBuyVariety() 
    {
        return buyVariety;
    }

    public void setTraceNo(String traceNo) 
    {
        this.traceNo = traceNo;
    }

    public String getTraceNo() 
    {
        return traceNo;
    }

    public void setRatifyLandType(String ratifyLandType) 
    {
        this.ratifyLandType = ratifyLandType;
    }

    public String getRatifyLandType() 
    {
        return ratifyLandType;
    }

    public void setForecastYield(String forecastYield) 
    {
        this.forecastYield = forecastYield;
    }

    public String getForecastYield() 
    {
        return forecastYield;
    }

    public void setCompanyName(String companyName) 
    {
        this.companyName = companyName;
    }

    public String getCompanyName() 
    {
        return companyName;
    }

    public void setUsci(String usci) 
    {
        this.usci = usci;
    }

    public String getUsci() 
    {
        return usci;
    }

    public void setSeedSale(String seedSale) 
    {
        this.seedSale = seedSale;
    }

    public String getSeedSale() 
    {
        return seedSale;
    }

    public void setNqyWeight(String nqyWeight) 
    {
        this.nqyWeight = nqyWeight;
    }

    public String getNqyWeight() 
    {
        return nqyWeight;
    }

    public void setGrossWeight(String grossWeight) 
    {
        this.grossWeight = grossWeight;
    }

    public String getGrossWeight() 
    {
        return grossWeight;
    }

    public void setTareWeight(String tareWeight) 
    {
        this.tareWeight = tareWeight;
    }

    public String getTareWeight() 
    {
        return tareWeight;
    }

    public void setGrossWay(Long grossWay) 
    {
        this.grossWay = grossWay;
    }

    public Long getGrossWay() 
    {
        return grossWay;
    }

    public void setTareWay(Long tareWay) 
    {
        this.tareWay = tareWay;
    }

    public Long getTareWay() 
    {
        return tareWay;
    }

    public void setGrossDate(String grossDate) 
    {
        this.grossDate = grossDate;
    }

    public String getGrossDate() 
    {
        return grossDate;
    }

    public void setTareDate(String tareDate) 
    {
        this.tareDate = tareDate;
    }

    public String getTareDate() 
    {
        return tareDate;
    }

    public void setButtressWeight(String buttressWeight) 
    {
        this.buttressWeight = buttressWeight;
    }

    public String getButtressWeight() 
    {
        return buttressWeight;
    }

    public void setNmembraneSkin(String nmembraneSkin) 
    {
        this.nmembraneSkin = nmembraneSkin;
    }

    public String getNmembraneSkin() 
    {
        return nmembraneSkin;
    }

    public void setAgrCompanyId(String agrCompanyId) 
    {
        this.agrCompanyId = agrCompanyId;
    }

    public String getAgrCompanyId() 
    {
        return agrCompanyId;
    }

    public void setAgrCompanyName(String agrCompanyName) 
    {
        this.agrCompanyName = agrCompanyName;
    }

    public String getAgrCompanyName() 
    {
        return agrCompanyName;
    }

    public void setAgrSectionId(String agrSectionId) 
    {
        this.agrSectionId = agrSectionId;
    }

    public String getAgrSectionId() 
    {
        return agrSectionId;
    }

    public void setAgrSectionName(String agrSectionName) 
    {
        this.agrSectionName = agrSectionName;
    }

    public String getAgrSectionName() 
    {
        return agrSectionName;
    }

    public void setAgrNwet(String agrNwet) 
    {
        this.agrNwet = agrNwet;
    }

    public String getAgrNwet() 
    {
        return agrNwet;
    }

    public void setAgrNimpurity(String agrNimpurity) 
    {
        this.agrNimpurity = agrNimpurity;
    }

    public String getAgrNimpurity() 
    {
        return agrNimpurity;
    }

    public void setFactoryName(String factoryName) 
    {
        this.factoryName = factoryName;
    }

    public String getFactoryName() 
    {
        return factoryName;
    }

    public void setSpeasantPic(String speasantPic) 
    {
        this.speasantPic = speasantPic;
    }

    public String getSpeasantPic() 
    {
        return speasantPic;
    }

    public void setGrossAfterPic(String grossAfterPic) 
    {
        this.grossAfterPic = grossAfterPic;
    }

    public String getGrossAfterPic() 
    {
        return grossAfterPic;
    }

    public void setGrossLaterPic(String grossLaterPic) 
    {
        this.grossLaterPic = grossLaterPic;
    }

    public String getGrossLaterPic() 
    {
        return grossLaterPic;
    }

    public void setTareAfterPic(String tareAfterPic) 
    {
        this.tareAfterPic = tareAfterPic;
    }

    public String getTareAfterPic() 
    {
        return tareAfterPic;
    }

    public void setTareLaterPic(String tareLaterPic) 
    {
        this.tareLaterPic = tareLaterPic;
    }

    public String getTareLaterPic() 
    {
        return tareLaterPic;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setCreateBy(String createBy) 
    {
        this.createBy = createBy;
    }

    public String getCreateBy() 
    {
        return createBy;
    }

    public void setCreateTime(String createTime) 
    {
        this.createTime = createTime;
    }

    public String getCreateTime() 
    {
        return createTime;
    }

    public void setUpdateBy(String updateBy) 
    {
        this.updateBy = updateBy;
    }

    public String getUpdateBy() 
    {
        return updateBy;
    }

    public void setUpdateTime(String updateTime) 
    {
        this.updateTime = updateTime;
    }

    public String getUpdateTime() 
    {
        return updateTime;
    }

    public void setRemark(String remark) 
    {
        this.remark = remark;
    }

    public String getRemark() 
    {
        return remark;
    }

    public void setYear(String year) 
    {
        this.year = year;
    }

    public String getYear() 
    {
        return year;
    }

    public void setSampleNumberList(String sampleNumberList) 
    {
        this.sampleNumberList = sampleNumberList;
    }

    public String getSampleNumberList() 
    {
        return sampleNumberList;
    }

    public void setSampleNumberCount(Long sampleNumberCount) 
    {
        this.sampleNumberCount = sampleNumberCount;
    }

    public Long getSampleNumberCount() 
    {
        return sampleNumberCount;
    }

    public void setSaleInfosId(Long saleInfosId) 
    {
        this.saleInfosId = saleInfosId;
    }

    public Long getSaleInfosId() 
    {
        return saleInfosId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("subsidyNum", getSubsidyNum())
            .append("slistNum", getSlistNum())
            .append("partyname", getPartyname())
            .append("certnumber", getCertnumber())
            .append("address", getAddress())
            .append("planterFlag", getPlanterFlag())
            .append("speasantName", getSpeasantName())
            .append("speasantPhone", getSpeasantPhone())
            .append("speasantPlant", getSpeasantPlant())
            .append("farmerPlantAddress", getFarmerPlantAddress())
            .append("regionName", getRegionName())
            .append("cropArea", getCropArea())
            .append("buyVariety", getBuyVariety())
            .append("traceNo", getTraceNo())
            .append("ratifyLandType", getRatifyLandType())
            .append("forecastYield", getForecastYield())
            .append("companyName", getCompanyName())
            .append("usci", getUsci())
            .append("seedSale", getSeedSale())
            .append("nqyWeight", getNqyWeight())
            .append("grossWeight", getGrossWeight())
            .append("tareWeight", getTareWeight())
            .append("grossWay", getGrossWay())
            .append("tareWay", getTareWay())
            .append("grossDate", getGrossDate())
            .append("tareDate", getTareDate())
            .append("buttressWeight", getButtressWeight())
            .append("nmembraneSkin", getNmembraneSkin())
            .append("agrCompanyId", getAgrCompanyId())
            .append("agrCompanyName", getAgrCompanyName())
            .append("agrSectionId", getAgrSectionId())
            .append("agrSectionName", getAgrSectionName())
            .append("agrNwet", getAgrNwet())
            .append("agrNimpurity", getAgrNimpurity())
            .append("factoryName", getFactoryName())
            .append("speasantPic", getSpeasantPic())
            .append("grossAfterPic", getGrossAfterPic())
            .append("grossLaterPic", getGrossLaterPic())
            .append("tareAfterPic", getTareAfterPic())
            .append("tareLaterPic", getTareLaterPic())
            .append("delFlag", getDelFlag())
            .append("deptId", getDeptId())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("year", getYear())
            .append("sampleNumberList", getSampleNumberList())
            .append("sampleNumberCount", getSampleNumberCount())
            .append("saleInfosId", getSaleInfosId())
            .toString();
    }
}
